﻿#region Using

using Common.Base;
using Common.Extensions;

using GameCommon.Args;
using GameCommon.Manager;
using GameCommon.ManagerInterfaces;
using GameCommon.Services;

using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

#endregion

namespace GameCommon.HitBoxes
{
    public class RectangleHitBox : HitBox
    {
        private readonly Texture2D texture2D;

        public RectangleHitBox(string id, Dimension dimension, string command)
            : base(id)
        {
            this.Command = command;
            this.Dimension = dimension;
            this.texture2D = Managers.ContentManager.GetRectangle(Color.Red);
        }

        //// TODO Remove HitBox drawing
        public override void Draw(IDrawingManager manager, GameTime gameTime)
        {
            ////this.DrawingService.Draw(manager, this.texture2D, this.Dimension, 0.5f, 2);
        }

        public override bool IsPointInHitbox(Position point)
        {
            return this.Rectangle.IsPointInRectangle(point);
        }
    }
}